package com.xzh.wms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.xzh.wms.entity.*;
import com.xzh.wms.service.VendorService;
import java.util.List;

 /**
 * 供应商表;(206_vendor)控制层
 * @author : heimi
 * @date : 2024-11-23
 */
@RestController
@RequestMapping("/api/vendor")
public class VendorController{
    @Autowired
    private VendorService vendorService;
    
    /** 
     * 查询接口
     */
     @GetMapping
     public List<Vendor> select(VendorQuery query){
        return vendorService.select(query);
    }
    
    @PostMapping 
    public Integer insert(@RequestBody Vendor product){
       return vendorService.insert(product);
    }
    
    @PutMapping 
    public Integer update(@RequestBody Vendor product){
        return vendorService.update(product);
    }
    
    @DeleteMapping
    public Integer delete(Integer id){
        return vendorService.delete(id);
    }
}